package com.xuln.junit;

import org.junit.After;
import org.junit.Before;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author xulunan
 */
public class MyTestCase {
	public static AbstractXmlApplicationContext appContext;

	@Before
	public void initApplicationContext() {
		if (appContext == null) {
			// String contextPath[] = {
			// "WebRoot/WEB-INF/classes/applicationContext.xml" };
			// appContext = new FileSystemXmlApplicationContext(contextPath);
			appContext = new ClassPathXmlApplicationContext("applicationContext*.xml");
		}
		System.out.println("配置文件加载正常。。。。。");
	}

	@After
	public void runAfterTest() {
		appContext = null;
		System.out.println("测试结束。。。。。");
	}
}
